namespace OFX.Aggregator.Infrastructure
{
	#region #using Directives

	using System.Collections;

	#endregion

	public static class SingletonContainer
	{
		private static IIocContainerAbstraction staticContainerImplementation;

		public static void Setup(IIocContainerAbstraction containerImplementation)
		{
			staticContainerImplementation = containerImplementation;
		}

		#region Implementation of IContainer

		public static T Resolve<T>()
		{
			return staticContainerImplementation.Resolve<T>();
		}

		public static T Resolve<T>(IDictionary parameters)
		{
			return staticContainerImplementation.Resolve<T>(parameters);
		}

		public static T Resolve<T>(string key)
		{
			return staticContainerImplementation.Resolve<T>(key);
		}

		public static T Resolve<T>(string key, IDictionary parameters)
		{
			return staticContainerImplementation.Resolve<T>(key, parameters);
		}

		#endregion
	}
}